<template>
  <div class="b-header">
    <img :src="src"
         :alt="title"
         :title="title"
         v-if="src"
         width="76">

    <h4 :class="['b-header--title',titleCls]"
        v-if="title">{{title}}</h4>

    <div :class="['b-header__link',subTitleCls]"
         v-if="$slots.default || link">
      <slot>{{link}}</slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BHeader',
  props: {
    href: {
      type: String,
      default: 'login_bot.png'
    },
    title: {
      type: String
    },
    link: {
      type: String
    },
    titleCls: String,
    subTitleCls: String

  },
  computed: {
    src () {
      return require(`@/assets/img/${this.href}`)
    }
  }
}
</script>

<style lang="scss" scoped>
.b-header {
  padding-bottom: 40px;
  &--title {
    font-size: 24px;
    color: #404040;
    line-height: 24px;
    margin: 0;
    padding-top: 40px;
  }
  &__link {
    padding-top: 8px;
    font-size: 14px;
    color: #404040;
    line-height: 14px;
  }
}
</style>
